import {reqCategoryList} from '../req'

const state= {
    //首页 PanelList部分
    PanelList:{
        registerNum:'',
        loginNum:'',
        videoViewNum:'',
        courseNum:''
    }
};
const mutations= {
    CATEGORYLIST(state,categoryList){
        state.PanelList= categoryList 
    },
};
const actions= {
    //api函数请求调用，向服务器发请求
    async catgoryList({commit}){
        let result = await reqCategoryList();
        if(result.code == 200){
            commit("CATEGORYLIST",result.data.data.indexSta)
        }
    },
};
const getters= {

};
export default({
    state,//数据存放
    mutations,//修改state数据
    actions,//业务逻辑
    getters,//计算属性
})